package huanzhao.erp.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
@TableName(value ="transfer")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Transfer implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 转库时间
     */
    @TableField(value = "time")
    private Date time;

    /**
     * 手机id
     */
    @TableField(value = "phone_id")
    private Long phoneId;

    /**
     * 转出团队id
     */
    @TableField(value = "from_team")
    private Long fromTeam;

    /**
     * 转入团队id
     */
    @TableField(value = "to_team")
    private Long toTeam;

    /**
     * 转调人id
     */
    @TableField(value = "operator_id")
    private Long operatorId;

    /**
     * 接收的采购员id
     */
    @TableField(value = "purchaser_id")
    private Long purchaserId;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public Transfer(Long phoneId, Long fromTeam, Long toTeam, Long operatorId, Long purchaserId) {
        this.phoneId = phoneId;
        this.fromTeam = fromTeam;
        this.toTeam = toTeam;
        this.operatorId = operatorId;
        this.purchaserId = purchaserId;
    }
}